<? include block('htmla') ?>

<form action="" method="post">

	<fieldset>
		<legend> <?=t('Site configuration', 'tpl')?> </legend>
		
		<? if (is_array($d = dat('config')) && sizeof($d)) { ?>
			<table class="xwide"><thead><tr><td><?=t('Name', 'tpl')?></td><td class="xwide"><?=t('Value', 'tpl')?></td></tr></thead><tbody>
				<? foreach($d as $id => $v) { ?>
					<tr><td><?=$id?></td><td>
						<input type="text" class="xwide" name="config[<?=h($id)?>]" value="<?=h($v)?>" />
					</td></tr>
				<? } ?>
			</tbody></table>
		<? } ?>

		<h3><?=t('Add property', 'tpl')?></h3>
			<label><?=t('Property name', 'tpl')?> 
			<input type="text" name="title" /></label>
			<label><?=t('Property value', 'tpl')?> 
			<input type="text" name="text" class="wide" /></label>
			<input type="submit" name="create_object" value="<?=ht('Add', 'tpl')?>" />


	</fieldset>

	
	<p><input type="submit" name="editor_save" value="<?=ht('Save', 'tpl')?>" /></p>

</form>

<? include block('_htmla');